package day_4.dmeo;/*
 *@ 代阳敲的专属代码
 **/

public class Single {
    private String name;

   private Single(String name) {
        this.name = name;
    }
    public Single getSingle(){
       return  new Single("代阳");
    }
}
class Single2 {
    private String name;
    private Single2(String name) {
        this.name = name;
    }
    private Single2 single2;
    public Single2 getSingle(){
        if(single2==null)
            return new Single2("小红");
        else
            return single2;
    }
}